A conventional air conditioner includes a body, a filter, a front panel, and a locking mechanism. The filter is detachably mounted on the body. The front panel is pivotally mounted on the body. The front panel can be pivoted to a closed position to cover the filter, and can be pivoted to an open position to uncover the filter so as to allow a user to remove and clean the filter. The locking mechanism has a recess formed in the body, and a hook portion extending from the front panel. The hook portion engages the recess to hold the front panel in the closed position. However, the operation of the locking mechanism is laborious and inconvenient, and damage to the locking mechanism can happen.